import com.beans.User;
import com.beans.UserBeans;
import com.beans.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
//        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
//        UserController userController = context.getBean("userController", UserController.class);
//        userController.sayHi();
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
//        User user = (User) context.getBean("user1",User.class);
        UserBeans userBeans = context.getBean(UserBeans.class);
        userBeans.func();

    }
}
